package com.robert.config;

import com.alibaba.druid.pool.DruidDataSource;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 *
 * </p>
 *
 * @author robert zhao
 * @since 2020/5/6
 */
@Configuration
public class BlogConfig {

  @Bean
  public DataSource createDataSource(){
    DruidDataSource druidDataSource = new DruidDataSource();
    druidDataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
    druidDataSource.setUrl("jdbc:mysql://39.106.128.18:3306/mybatistest");
    druidDataSource.setUsername("mybatistest");
    druidDataSource.setPassword("Zb@123456");
    return  druidDataSource;
  }
}
